__author__ = 'zoulida'
import tkinter as tk
root = tk.Tk()
width = root.winfo_screenwidth()
height = root.winfo_screenheight()
print(width)
print(height)
root.destroy()
if width != 1920 or  height != 1080:
    print('目前分辨率为', width, height, '重新设置分辨率1920，1080失败，马上重启')
    import time
    time.sleep(1)
    waittime = 600
    from os import system
    system('shutdown -r -t 600')
    i = 1
    while i < waittime:
        print('还有%s秒重启电脑'%(waittime - i))
        i = i + 1
        time.sleep(1)